<template>
  <div>
    <van-popup v-model:show="isShow">
      <div class="popup">
        <img src="@a/img/success.png" alt="" />
        <div class="mt16" style="font-size: 0.48rem">{{ text }}</div>
        <div class="ft28 mt16 mb16" style="text-indent: 2em">
          <slot></slot>
        </div>

        <van-button round block color="#2D65AC" @click="$toPage('/index')">
          返回首页
        </van-button>
      </div>
    </van-popup>
  </div>
</template>

<script setup>
import { ref } from 'vue'
defineProps({
  isShow: Boolean,
  text: { type: String, default: '提交成功' }
})
</script>

<style scoped lang="scss">
.popup {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.426667rem;
  box-sizing: border-box;
  img {
    width: 4.16rem;
    height: 3.466667rem;
  }
}
</style>
